  var id = getvl("id");

$(function(){
	  if(id!=''){
	  	zhanghuxinxi(id);
	  }else{
	  	alert("传入值有误");
	  }
});
$('#imgss').html("");
 function  zhanghuxinxi(id){
   	$.ajax({
		url: urlcore + "/api/shopInfo/selectagno1?shopId="+id,
		type: "get",
		dataType: 'json',
		contentType: "application/json;charset=utf-8",
		success:function(data){
			if (data.success == true) {
		var imgss="";
		var jingji=0;
				   var da=data.data;
              var  creditLevel=da.creditLevel;
              imgss+='<div class="xinyu_title">'; 
                 if(creditLevel<=5){
                 	imgss+="卖家信誉：";
                  	  for(var i=0;i<creditLevel;i++){
                       imgss+='<img src="../images/aixin.png"/>';
                  }
                  	     jingji=((creditLevel+1)*1000)-(creditLevel*1000);
                  	  imgss+='<span>信誉积'+(creditLevel*1000)+'分</span>';
                  }else if(creditLevel<=10){
                  	imgss+="卖家信誉：";
                  	var credit=creditLevel-5;
                  	  for(var i=0;i<credit;i++){
                        imgss+='<img src="../images/zuan.png"/>';
                        
                  }
                  	     jingji=((creditLevel+1)*10000)-(creditLevel*10000);
                  	   imgss+='<span>信誉积'+(creditLevel*10000)+'分</span>';
                  	   
                  }else if(creditLevel<=15){
                  	var credit=creditLevel-10;
                  	imgss+="卖家信誉：";
                  	 for(var i=0;i<credit;i++){
                       imgss+='<img src="../images/guan.png"/>';
                        // $('#imgss').append(imgss);
                  }
                  	    jingji=((creditLevel+1)*100000)-(creditLevel*100000);
                  	 imgss+='<span>信誉积'+(creditLevel*100000)+'分</span>';
                  	  // $("#jifen").html("信誉积分"+(creditLevel*1000));
                  }
                  
                  
                  imgss+='</div>'+
                  '<h6>离升级还差<em>'+jingji+'分</em></h6>'+
	                '<h6>违规扣分:<em>1000分</em></h6>';
	                $("#imgss").append(imgss);
			}
		},
		error:function() {
			/* Act on the event */
			alert("error");
		}
	});	
}
